package example.dao;

import example.pojo.user;
import example.service.jsonzhuan;
import net.sf.json.JSONObject;
import org.json.JSONException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;


public class home_title_sql {
    public static String home_title_sql() throws SQLException, JSONException {
        user use = new user();
        JSONObject json = JSONObject.fromObject(use);//将java对象转换为json对象
        String str = json.toString();
        return str;
//        Connection conn = connect.getConnection();
//        Statement stmt = conn.createStatement();
//        ResultSet p = stmt.executeQuery("select * from test");
//        String ceshi = jsonzhuan.resultSetToJson(p);
//        return ceshi;
    }

}
